# -*- coding: utf-8 -*- 
#
# Description:
#
#  Definiton
#
#
#
# Changes:
#
# 2012-01-10
# Initial Commit
#
#
# Copyright 2010-2012, WyDev Team.
# Author: Polo35 (polo35580@hotmail.fr)
#
# Licenced under Academic Free License version 3.0
# Review WyGui README & LICENSE files for further details.

nname: 0
n 0(None)[self.live_manager = wyrecord.live_manager
self.scheduler = wyrecord.scheduler
self.ext_disk_space = wyrecord.ext_disk_space
self.renderer_manager = wyrecord.renderer_manager
]:
	i: 
	o: 

self.nodes: {0: <unpyclib.structure.node instance at 0xb761138c>}
nname: 201
n 201(None)[return ret
]:
	i: 0(AL), 200()
	o: 

nname: 200
n 200(None)[]:
	i: 9(AF), 197()
	o: 201()

nname: 197
n 197(None)[]:
	i: 172(JA), 196()
	o: 200()

nname: 196
n 196(None)[_POP_TOP pass
]:
	i: 25&34(f), 193()
	o: 197()

nname: 193
n 193(None)[continue
]:
	i: 83(JA), 176()
	o: 196()

nname: 176
n 176(None)[live.stop()
ret = True
]:
	i: 48(f)
	o: 193()

nname: 172
n 172(None)[]:
	i: 73(f)
	o: 197(JA)

nname: 83
n 83(None)[self.renderer_manager.getDefaultRenderer().stop()
live.resetRecorder()
live.zap(live.serviceid, live.deviceid)
self.renderer_manager.getDefaultRenderer().play(live, start_extern_eit=False)
ret = True
]:
	i: 73(t)
	o: 193(JA)

nname: 73
n 73(live.external_recorder)[]:
	i: 48(t)
	o: 83(t), 172(f)

nname: 48
n 48(self.renderer_manager.getDefaultRenderer().live == live)[]:
	i: 25&34(t)
	o: 73(t), 176(f)

nname: 25&34
n 25&34(force or not live.IsRecording())[for live in self.live_manager.GetRunningLiveList():
]:
	i: 9(for)
	o: 48(t), 196(f)

nname: 9
n 9(None)[]:
	i: 0(loop)
	o: 25&34(for), 200(AF)

nname: 0
n 0(None)[ret = False
]:
	i: 
	o: 9(loop), 201(AL)

nname: 201
n 201(None)[return ret
]:
	i: 0(AL), 9(AF), 196(), 73(f)
	o: 

nname: 196
n 196(None)[_POP_TOP pass
]:
	i: 25&34(f), 193()
	o: 201()

nname: 193
n 193(None)[continue
]:
	i: 83(JA), 176()
	o: 196()

nname: 176
n 176(None)[live.stop()
ret = True
]:
	i: 48(f)
	o: 193()

nname: 83
n 83(None)[self.renderer_manager.getDefaultRenderer().stop()
live.resetRecorder()
live.zap(live.serviceid, live.deviceid)
self.renderer_manager.getDefaultRenderer().play(live, start_extern_eit=False)
ret = True
]:
	i: 73(t)
	o: 193(JA)

nname: 73
n 73(live.external_recorder)[]:
	i: 48(t)
	o: 83(t), 201(f)

nname: 48
n 48(self.renderer_manager.getDefaultRenderer().live == live)[]:
	i: 25&34(t)
	o: 73(t), 176(f)

nname: 25&34
n 25&34(force or not live.IsRecording())[for live in self.live_manager.GetRunningLiveList():
]:
	i: 9(for)
	o: 48(t), 196(f)

nname: 9
n 9(None)[]:
	i: 0(loop)
	o: 25&34(for), 201(AF)

nname: 0
n 0(None)[ret = False
]:
	i: 
	o: 9(loop), 201(AL)

self.nodes: {0: <unpyclib.structure.node instance at 0xb7611b2c>, 176: <unpyclib.structure.node instance at 0xb7611b8c>, 196: <unpyclib.structure.node instance at 0xb7611d6c>, 193: <unpyclib.structure.node instance at 0xb7611f4c>, 9: <unpyclib.structure.node instance at 0xb7611bac>, '25&34': <unpyclib.structure.node instance at 0xb7611c8c>, 48: <unpyclib.structure.node instance at 0xb7611e6c>, 83: <unpyclib.structure.node instance at 0xb7611fec>, 73: <unpyclib.structure.node instance at 0xb7611f0c>, 201: <unpyclib.structure.node instance at 0xb76182ac>}
nname: 0
n 0(None)[self.scheduler.StopAllRunningRecord()
]:
	i: 
	o: 

self.nodes: {0: <unpyclib.structure.node instance at 0xb760bfcc>}
nname: 6
n 6(None)[def __init__(self, wyrecord):
	self.live_manager = wyrecord.live_manager
	self.scheduler = wyrecord.scheduler
	self.ext_disk_space = wyrecord.ext_disk_space
	self.renderer_manager = wyrecord.renderer_manager

checkDiskUsage = GlobalLock()()
def stopAllTimeshift(self, force=False):
	ret = False

def stopAllRecord(self):
	self.scheduler.StopAllRunningRecord()

]:
	i: 
	o: 

self.nodes: {6: <unpyclib.structure.node instance at 0xb760bc8c>}
nname: 0
n 0(None)[__doc__ = '\nChecks the disk usage for timeshift and record.\n\ntimeshift have a max disk use property\nrecord may be stopped when needed\n\nconfiguration :\n\nconfig.disk_usage_check_period\nconfig.max_size_for_timeshift\nconfig.max_percentage_disk_use\n\n\n'
import os
from config import *
from externaldiskspace import SpaceInfo
from logger import log
from peewee.analyse import Chrono
from callbacks import Callbacks
from globallock import GlobalLock
class DiskSpaceChecker(object):
	def __init__(self, wyrecord):
		self.live_manager = wyrecord.live_manager
		self.scheduler = wyrecord.scheduler
		self.ext_disk_space = wyrecord.ext_disk_space
		self.renderer_manager = wyrecord.renderer_manager

	checkDiskUsage = GlobalLock()()
	def stopAllTimeshift(self, force=False):
		ret = False

	def stopAllRecord(self):
		self.scheduler.StopAllRunningRecord()



]:
	i: 
	o: 

self.nodes: {0: <unpyclib.structure.node instance at 0xb7605dcc>}
__doc__ = '\nChecks the disk usage for timeshift and record.\n\ntimeshift have a max disk use property\nrecord may be stopped when needed\n\nconfiguration :\n\nconfig.disk_usage_check_period\nconfig.max_size_for_timeshift\nconfig.max_percentage_disk_use\n\n\n'
import os
from config import *
from externaldiskspace import SpaceInfo
from logger import log
from peewee.analyse import Chrono
from callbacks import Callbacks
from globallock import GlobalLock
class DiskSpaceChecker(object):
	def __init__(self, wyrecord):
		self.live_manager = wyrecord.live_manager
		self.scheduler = wyrecord.scheduler
		self.ext_disk_space = wyrecord.ext_disk_space
		self.renderer_manager = wyrecord.renderer_manager

	checkDiskUsage = GlobalLock()()
	def stopAllTimeshift(self, force=False):
		ret = False

	def stopAllRecord(self):
		self.scheduler.StopAllRunningRecord()



